{% extends "base.html" %}
{% block nav %}
<nav class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="/">Gallery</a>
            </div>
            <div class="navbar-collapse collapse" id="navbar">
                <ul class="nav navbar-nav">
                    <li><a href="/view/random_file"><span class="glyphicon glyphicon-random"></span> Random File</a></li>
                    <li><a href="/jump_dir"><span class="glyphicon glyphicon-list"></span> Fast Navigation</a></li>
                    {% if self._TemplateReference__context.name=="view_dir.html" %}
                        <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
                            <span class="glyphicon glyphicon-plus-sign"></span> Create
                            <span class="caret"></span></a>
                            <ul class="dropdown-menu" role="menu">
                                <li><a href="#" onclick="kbGalleryUpload(event);"><span class="glyphicon glyphicon-cloud-upload"></span> File</a></li>
                                <li><a href="#" onclick="kbGalleryCreateDir(event);"><span class="glyphicon glyphicon-folder-open"></span> Folder</a></li>
                            </ul>
                        </li>
                    {% endif %}
                    {% if auth_dict['is_eboard'] or auth_dict['is_rtp'] %}
                        <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
                            <span class="glyphicon glyphicon-lock"></span> Admin
                            <span class="caret"></span></a>
                            <ul class="dropdown-menu" role="menu">
                                {% if lockdown %}
                                    <li><a href="#" onclick="galleryLockdown(event);"><span class="glyphicon glyphicon-off"></span> Open Gallery</a></li>
                                    {% else %}
                                    <li><a href="#" onclick="galleryLockdown(event);"><span class="glyphicon glyphicon-lock"></span> Lockdown</a></li>
                                {% endif %}
                            </ul>
                        </li>
                    {% endif %}
                </ul>
                <ul class="nav navbar-nav navbar-right">
                    <li class="dropdown navbar-user">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
                            <img src="https://profiles.csh.rit.edu/image/{{ auth_dict['uid'] }}">
                            {{ auth_dict['name'] }}
                            <span class="caret"></span>
                        </a>
                        <ul class="dropdown-menu" role="menu">
                            <li><a href="https://profiles.csh.rit.edu/user/{{ auth_dict['uid'] }}"><span class="glyphicon glyphicon-user"></span> Profile</a></li>
                            <li class="divider"></li>
                            <li><a href="https://members.csh.rit.edu/"><span class="glyphicon glyphicon-globe"></span> Members Portal</a></li>
                            <li><a href="https://github.com/ComputerScienceHouse/gallery/issues"><span class="glyphicon glyphicon-exclamation-sign"></span> Report an Issue</a></li>
                            <li><a href="#" onclick="kbGalleryHelp(event);"><span class="glyphicon glyphicon-question-sign"></span> Help</a></li>
                            <li><a href="{{ url_for('logout') }}"><span class="glyphicon glyphicon-log-out"></span> Logout</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </nav>
{% endblock %}
